package logging

import (
	"fmt"
	"github.com/gin-blog/pkg/setting"
	"time"
)

/**
http://researchlab.github.io/2016/06/14/go-time-summary/
时间格式化说明
*/

/**
获取当前运行时代码目录
https://golangtc.com/t/5454fb33421aa960c7000012
*/
func getLogFilePath() string {
	return fmt.Sprintf("%s%s", setting.AppSetting.RuntimeRootPath, setting.AppSetting.LogSavePath)
}

func getLogFileName() string {
	return fmt.Sprintf("%s%s.%s",
		setting.AppSetting.LogSaveName,
		time.Now().Format(setting.AppSetting.TimeFormat),
		setting.AppSetting.LogFileExt)
}
